package ooday05;
/* 测试类 */
public class StaticDemo {
    public static void main(String[] args) {
        StaticVar s1=new StaticVar();
        s1.show();
        StaticVar s2=new StaticVar();
        s2.show();
        StaticVar s3=new StaticVar();
        s3.show();
        //常常通过类名.来访问
        System.out.println(StaticVar.b);

        System.out.println("------------------------------------------------");

        //执行StaticBlock中的代码
        StaticBlock s4=new StaticBlock();
        StaticBlock s5=new StaticBlock();
        StaticBlock s6=new StaticBlock();

        System.out.println("------------------------------------------------");
        //通过类名.点来访问
        StaticMethod.test();
    }
}
